# -*- coding: utf-8 -*-
"""
@Author: Logan
@Date:   2025/7/1 19:00
@Description: 
"""
from selenium.webdriver.common.by import By
from base.ObjectMap import ObjectMap
from base.HoverAvatarBase import HoverAvatarBase


class HoverAvatarPage(HoverAvatarBase, ObjectMap):

    def hover_avatar_and_click_item(self, driver, list_item):
        """
        悬停并点击
        :param driver:
        :param list_item: 点击的列表项
        :return:
        """
        hover_element_xpath = self.navbar_user_avatar()
        select_element_xpath = self.hover_avatar_list(list_item)
        return self.hover_and_click(driver, By.XPATH, hover_element_xpath, By.XPATH, select_element_xpath)
